type Item = { label: string; value: string };

const defaultOptions1: Readonly<Item>[] = [
  { label: '企业法人', value: '1000' },
  { label: '车队长', value: '1001' },
  { label: '安全员', value: '1002' },
  { label: '司机', value: '1004' },
];

const defaultOptions2: Readonly<Item>[] = [
  ...defaultOptions1,
  { label: '组长', value: '1005' },
  { label: '环卫工人', value: '1006' },
];

const StudyObjDict = defaultOptions2.reduce<Record<string, string>>((a, b) => {
  a[b.value] = b.label;
  return a;
}, {});

const subjectOptionsMap = {
  '1000': '企业法人',
  '1001': '车队长',
  '1002': '安全员',
  '1004': '司机',
  '1005': '组长',
  '1006': '环卫工人',
};

export { defaultOptions1, defaultOptions2, StudyObjDict, subjectOptionsMap };
export type { Item };
